import request from '@/utils/request';

export async function queryDayRule(url, params) {
  return request(url, {
    params,
  });
}
export async function storeList(params) {
  return request(`/store/store/list`, {
    params
  });
}

export async function getAllStore(payload, params) {
  return request(`store/statistics/all/consume/${payload}`, {
    params,
  });
}
export async function exportConsume({
  type,
  storeId,
  date
}) {
  return request(
    storeId ?
    `/store/statistics/all/consume/exportCount/${type}?date=${date}&storeId=${storeId}` :
    `/store/statistics/all/consume/exportCount/${type}?date=${date}`, {
      method: 'GET',
      responseType: 'blob',
    },
  );
}
